﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

namespace TD
{
    public class Monster
    {
        /// <summary>
        /// 当前生命值
        /// </summary>
        public float HP = 100;

        /// <summary>
        /// 最大生命值
        /// </summary>
        public float MaxHP = 100;

        /// <summary>
        /// 当前位置
        /// </summary>
        public Vector2 Vector;

        /// <summary>
        /// 目标位置
        /// </summary>
        public Vector2 TargetVector;


        /// <summary>
        /// 速度
        /// </summary>
        public float Speed =1f;

        /// <summary>
        /// 收到攻击
        /// </summary>
        /// <param name="attack"></param>
        public void Rev(Attack attack)
        {

            HP -= attack.Damage;
            if (HP < 0)
            {
                HP = 0;
            }
        }

        public TimeSpan DeadSeconds;

        /// <summary>
        /// 当前位于第几个节点
        /// </summary>
        public int CurrentPoint = 0;

    }
}